#include"processbar.h"
#include<memory.h>

char LoadPattern[4] = {'/','-','|','\\'};

void processbar()
{
  int i = 1;
  char bar[NUM]={0};
  memset(bar,' ',101);
  bar[101] = ']';
  for(;i <= 100; i++)
  {
    bar[i-1] = STYLE;
    bar[i] = END;
    printf("[%s[%-2d%%][%c]\r",bar,i,LoadPattern[i%4]);
    fflush(stdout);
    usleep(70000);
  }
  printf("\n");
} 
